<template>
  <view>
    <uni-nav-bar :title="`团成员-${name}`" left-icon="left" @clickLeft="navBack" :fixed="true" statusBar></uni-nav-bar>
    <view class="league">
      <view class="leagueTop">
        <view class="">
          <text>{{data.driver_name}}</text>
          <text v-if="data.parent_name">邀请人：{{data.parent_name}}</text>
          <text>入团时间：{{data.createtime}}</text>
        </view>
        <image :src="data.driver_avatar" mode=""></image>
      </view>
      <view class="leagueBut" v-if="type!='super'">贡献环保分：{{data.score}}</view>
    </view>
    <List :type="'League'" @position="position" ></List>
  </view>
</template>

<script setup lang="ts">
import { Ref,ref } from 'vue';
import { navBack } from '@/utils/navigator';
import List from '@c/team/list.vue';
import { onLoad } from '@dcloudio/uni-app';
const data: Ref<any> = ref({});
const name=ref('')
const type=ref('')
onLoad((pearm)=>{
	type.value=pearm.type
	name.value=pearm.name
})
function position(e){
	data.value=e
}
</script>

<style scoped lang="less">
.league {
  width: 95%;
  margin: 2.5%;
  background-image: url(https://admin.anlan.tech/uploads/20221023/08a0714c031257c3ef2f33e23e6c11a0.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  border-radius: 5px;
  .leagueTop {
    width: 100%;
    padding: 20rpx;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    view {
      display: flex;
      flex-direction: column;
      text:nth-of-type(1) {
        font-size: 32rpx;
        font-weight: 400;
        color: #333333;
        margin-top: 0px;
        margin-bottom: 20rpx;
      }
      text {
        font-size: 24rpx;
        font-weight: 400;
        color: #666666;
        margin-top: 10rpx;
      }
    }
    image {
      width: 82rpx;
      height: 82rpx;
      border-radius: 50%;
    }
  }
  .leagueBut {
    padding: 20rpx;
    box-sizing: border-box;
    font-size: 32rpx;
    font-weight: 500;
    color: #1b91ff;
  }
}
</style>
